#include "mainuiplugin.h"

mainuiPlugin::mainuiPlugin(QObject *parent)
     :QObject( parent ),MainuiPluginInterface(":/files/info.json"),
    m_mainwidget(nullptr)
{

    m_mainwidget=new mainwidget;
}

mainuiPlugin::~mainuiPlugin()
{

}


QMap<QString,QList<QAction *>>  mainuiPlugin::getActions()
{
    QMap<QString,QList<QAction *>>  mymap;

    //panel[操作] and action
    QList<QAction *>actlist;

    QAction* actSave = new QAction;
    actSave->setText("save");
    actSave->setIcon(QIcon(":/Icon/Icon/save.svg"));
    actSave->setObjectName("actSave");
    actSave->setObjectName(QStringLiteral("save-action"));
    actlist.push_back(actSave);
    mymap.insert(u8"操作",actlist);

    return mymap;
}



 QString mainuiPlugin::getCatogry()
 {
     return QString(u8"主页");
 }


 QList<QWidget *> mainuiPlugin::getWidgets()
 {
    QList<QWidget *> widgetlist;

    m_mainwidget->setObjectName(QStringLiteral("main-widget"));
    widgetlist.push_back(m_mainwidget);
    return widgetlist;
 }
